package com.va.yahooweather.parser;

import java.util.HashMap;
import java.util.Map;
import org.dom4j.DocumentFactory;
import org.dom4j.io.SAXReader;

public class YahooXMLReader extends SAXReader{
    public static final SAXReader INSTANCE = new YahooXMLReader();
    
    private YahooXMLReader(){
        Map<String,String> uris = new HashMap<String,String>();
        uris.put( "yweather", "http://xml.weather.yahoo.com/ns/rss/1.0" );

        DocumentFactory factory = new DocumentFactory();
        factory.setXPathNamespaceURIs( uris );

        this.setDocumentFactory( factory );
    }
}
